<template>
  <div style="top: 0; width: 100%">
    <div v-drag class="pubbox">
      <div class="history">
        <div class="rect" :style="{ width: width }">
          <div class="flex flex_center" style="padding: 1.39vh 1.28vw 0 1.28vw">
            <div class="flex flex_center">
              <img :src="require('assets/images/icon/tips.png')" style="width: 1vw" />
              <p class="title">{{ title }}</p>
            </div>

            <i class="icon el-icon-close" @click="closeWin"></i>
          </div>
          <el-divider></el-divider>
          <div style="padding: 1.53vh 0.76vw"><slot></slot></div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    width: {
      type: String,
      default: "30vw",
    },
    title: String,
  },
  methods: {
    closeWin() {
      this.$emit("closewin");
    },
  },
};
</script>
<style lang="scss" scoped>
.history {
}
.pubbox {
  top: 20%;
  width: 100%;
  margin: 0 atuo;
}
.flex {
  display: flex;
}
.flex_center {
  justify-items: center;
}
.rect {
  position: absolute;
  width: 30vw;

  background-image: linear-gradient(
    90deg,
    rgba(3, 83, 165, 0.72) 0%,
    rgba(3, 56, 117, 0.93) 61%,
    rgba(3, 53, 110, 0.96) 100%
  );
  box-shadow: 0vw 0.13vw 0.52vw 0vw rgba(0, 0, 0, 0.26);
  border-radius: 0.21vw;
  border: solid 0.05vw #34a1ff;
  left: 0;
  right: 0;
  margin: 0 auto;
}
.icon {
  color: #fff;
  display: block;
  cursor: pointer;
}
.el-divider {
  background: #03d0fd;
  margin: 2vh 0;
}
.title {
  font-size: 0.8vw;
  font-weight: normal;
  font-stretch: normal;
  letter-spacing: 0vw;
  color: #03f2fb;
  padding-left: 0.46vw;
}
</style>
